/* 悬浮按钮 */
#pic-text-x-btn {
  position: fixed;
  bottom: 50px;
  right: 0;
  width: 55px;
  height: 50px;
  border: none;
  border-radius: 50px 0 0 50px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 2147483647;
  transition: all 0.2s;
  background: #409eff;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding-left: 15px;
  opacity: 0.7;
}

#pic-text-x-btn:hover {
  width: 65px;
  opacity: 1;
}

.pic-text-x-icon {
  width: 30px;
  height: 30px;
  pointer-events: none;
}

/* 弹窗 */
#pic-text-x-modal {
  position: fixed;
  width: 350px;
  height: 600px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 2147483647;
  display: none;
  flex-direction: column;
  /* 防止滚动传播到父页面 */
  overscroll-behavior: contain;
}

/* 弹窗标题栏（用于拖拽） */
.modal-header {
  padding: 12px 16px;
  background: #f0f0f0;
  cursor: move;
  user-select: none;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: #ff5c5c;
  color: white;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

/* 上传区 */
.upload-area {
  height: 160px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  margin: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 14px;
  color: #666;
  transition: border-color 0.3s;
  /* 添加过渡效果 */
  transition: all 0.3s ease;
  /* 鼠标悬停时显示手型光标 */
  cursor: pointer;
}

.upload-area.highlight {
  border-color: #409eff;
}

.upload-area.processing {
  border-color: #409eff;
  background-color: #f0f9ff;
}

.upload-area * {
  /* 所有子元素都显示手型光标 */
  cursor: pointer;
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 10px;
}

.upload-area p {
  margin: 8px 0 0;
}

/* 记录列表 */
.records {
  flex: 1;
  padding: 0 16px 16px;
  overflow-y: auto;
  font-size: 13px;
  /* 防止滚动传播到父页面 */
  overscroll-behavior: contain;
  /* 隐藏滚动条 */
  scrollbar-width: none; /* Firefox */
}

.records::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.records {
  -ms-overflow-style: none; /* IE and Edge */
}

.record-item {
  border: 1px solid #eee;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  position: relative;
}

/* 记录头部：文件名和操作按钮 */
.record-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.record-filename {
  font-weight: bold;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 10px;
}

.record-actions {
  display: flex;
  gap: 6px;
}

.btn-icon {
  background: none;
  border: none; /* 移除边框 */
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 4px; /* 只保留圆角 */
}

.btn-icon svg {
  fill: #666;
  width: 16px;
  height: 16px;
}

.btn-copy:hover svg {
  fill: #409eff;
}

.btn-download:hover svg {
  fill: #67c23a;
}

.btn-delete:hover svg {
  fill: #f56c6c;
}

/* 记录文字内容 */
.record-text {
  word-break: break-word;
  max-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
  font-size: 13px;
  color: #333;
}

/* 记录底部：时间和来源 */
.record-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #999;
}

.record-time {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 10px;
}

.record-source {
  white-space: nowrap;
  font-style: italic;
}

/* 消息提醒 */
.message-toast {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  z-index: 2147483647;
  font-size: 14px;
  text-align: center;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 80%;
  word-wrap: break-word;
}

.message-success {
  background-color: #f0f9ff;
  color: #409eff;
  border: 1px solid #cce9ff;
}

.message-error {
  background-color: #fef0f0;
  color: #f56565;
  border: 1px solid #fbc4c4;
}

.message-info {
  background-color: #f4f4f5;
  color: #909399;
  border: 1px solid #d3d4d6;
}